package com.xiaoyi.library.service.impl;

import com.xiaoyi.library.mapper.RecordMapper;
import com.xiaoyi.library.pojo.Record;
import com.xiaoyi.library.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RecordServiceImpl implements RecordService {
    private final RecordMapper recordMapper;

    @Autowired
    public RecordServiceImpl(RecordMapper recordMapper) {
        this.recordMapper = recordMapper;
    }

    @Override
    public List<Record> find() {
        return recordMapper.find();
    }

    @Override
    public List<Record> findByName(String recordBookName) {
        return recordMapper.findByName(recordBookName);
    }
}
